﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVVM_CAD.Model;

namespace MVVM_CAD.ViewModel
{
    class FigureFactory
    {
        public static IFigure GetFigure(string figureToken)
        {
            switch (figureToken)
            {
                case("MVVM_CAD.Model.Point"):
                    return new Point();
                case("MVVM_CAD.Model.Line"):
                    return new Line();
                case("MVVM_CAD.Model.PolyLine"):
                    return new PolyLine();
                case("MVVM_CAD.Model.Spline"):
                    return new Spline();
                case("MVVM_CAD.Model.Polygon"):
                    return new Polygon();
                case("MVVM_CAD.Model.Arc"):
                    return new Arc();
                case("MVVM_CAD.Model.Circle"):
                    return new Circle();
                default:
                    return new Point();
            }
        }
    }
}
